Optimal. Leaf size=250 \[ \frac {b c}{8 d^3 (i-c x)^2}-\frac {9 i b c}{8 d^3 (i-c x)}+\frac {9 i b c \text {ArcTan}(c x)}{8 d^3}-\frac {a+b \text {ArcTan}(c x)}{d^3 x}+\frac {i c (a+b \text {ArcTan}(c x))}{2 d^3 (i-c x)^2}+\frac {2 c (a+b \text {ArcTan}(c x))}{d^3 (i-c x)}-\frac {3 i a c \log (x)}{d^3}+\frac {b c \log (x)}{d^3}-\frac {3 i c (a+b \text {ArcTan}(c x)) \log \left (\frac {2}{1+i c x}\right )}{d^3}-\frac {b c \log \left (1+c^2 x^2\right )}{2 d^3}+\frac {3 b c \text {PolyLog}(2,-i c x)}{2 d^3}-\frac {3 b c \text {PolyLog}(2,i c x)}{2 d^3}+\frac {3 b c \text {PolyLog}\left (2,1-\frac {2}{1+i c x}\right )}{2 d^3} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.21, antiderivative size = 250, normalized size of antiderivative = 1.00, number
of steps used = 23, number of rules used = 15, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.652, Rules
used = {4996, 4946, 272, 36, 29, 31, 4940, 2438, 4972, 641, 46, 209, 4964, 2449, 2352}
\begin {gather*} \frac {2 c (a+b \text {ArcTan}(c x))}{d^3 (-c x+i)}+\frac {i c (a+b \text {ArcTan}(c x))}{2 d^3 (-c x+i)^2}-\frac {a+b \text {ArcTan}(c x)}{d^3 x}-\frac {3 i c \log \left (\frac {2}{1+i c x}\right ) (a+b \text {ArcTan}(c x))}{d^3}-\frac {3 i a c \log (x)}{d^3}+\frac {9 i b c \text {ArcTan}(c x)}{8 d^3}-\frac {b c \log \left (c^2 x^2+1\right )}{2 d^3}+\frac {3 b c \text {Li}_2(-i c x)}{2 d^3}-\frac {3 b c \text {Li}_2(i c x)}{2 d^3}+\frac {3 b c \text {Li}_2\left (1-\frac {2}{i c x+1}\right )}{2 d^3}-\frac {9 i b c}{8 d^3 (-c x+i)}+\frac {b c}{8 d^3 (-c x+i)^2}+\frac {b c \log (x)}{d^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 29
Rule 31
Rule 36
Rule 46
Rule 209
Rule 272
Rule 641
Rule 2352
Rule 2438
Rule 2449
Rule 4940
Rule 4946
Rule 4964
Rule 4972
Rule 4996
Rubi steps
\begin {align*} \int \frac {a+b \tan ^{-1}(c x)}{x^2 (d+i c d x)^3} \, dx &=\int \left (\frac {a+b \tan ^{-1}(c x)}{d^3 x^2}-\frac {3 i c \left (a+b \tan ^{-1}(c x)\right )}{d^3 x}-\frac {i c^2 \left (a+b \tan ^{-1}(c x)\right )}{d^3 (-i+c x)^3}+\frac {2 c^2 \left (a+b \tan ^{-1}(c x)\right )}{d^3 (-i+c x)^2}+\frac {3 i c^2 \left (a+b \tan ^{-1}(c x)\right )}{d^3 (-i+c x)}\right ) \, dx\\ &=\frac {\int \frac {a+b \tan ^{-1}(c x)}{x^2} \, dx}{d^3}-\frac {(3 i c) \int \frac {a+b \tan ^{-1}(c x)}{x} \, dx}{d^3}-\frac {\left (i c^2\right ) \int \frac {a+b \tan ^{-1}(c x)}{(-i+c x)^3} \, dx}{d^3}+\frac {\left (3 i c^2\right ) \int \frac {a+b \tan ^{-1}(c x)}{-i+c x} \, dx}{d^3}+\frac {\left (2 c^2\right ) \int \frac {a+b \tan ^{-1}(c x)}{(-i+c x)^2} \, dx}{d^3}\\ &=-\frac {a+b \tan ^{-1}(c x)}{d^3 x}+\frac {i c \left (a+b \tan ^{-1}(c x)\right )}{2 d^3 (i-c x)^2}+\frac {2 c \left (a+b \tan ^{-1}(c x)\right )}{d^3 (i-c x)}-\frac {3 i a c \log (x)}{d^3}-\frac {3 i c \left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac {2}{1+i c x}\right )}{d^3}+\frac {(b c) \int \frac {1}{x \left (1+c^2 x^2\right )} \, dx}{d^3}+\frac {(3 b c) \int \frac {\log (1-i c x)}{x} \, dx}{2 d^3}-\frac {(3 b c) \int \frac {\log (1+i c x)}{x} \, dx}{2 d^3}-\frac {\left (i b c^2\right ) \int \frac {1}{(-i+c x)^2 \left (1+c^2 x^2\right )} \, dx}{2 d^3}+\frac {\left (3 i b c^2\right ) \int \frac {\log \left (\frac {2}{1+i c x}\right )}{1+c^2 x^2} \, dx}{d^3}+\frac {\left (2 b c^2\right ) \int \frac {1}{(-i+c x) \left (1+c^2 x^2\right )} \, dx}{d^3}\\ &=-\frac {a+b \tan ^{-1}(c x)}{d^3 x}+\frac {i c \left (a+b \tan ^{-1}(c x)\right )}{2 d^3 (i-c x)^2}+\frac {2 c \left (a+b \tan ^{-1}(c x)\right )}{d^3 (i-c x)}-\frac {3 i a c \log (x)}{d^3}-\frac {3 i c \left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac {2}{1+i c x}\right )}{d^3}+\frac {3 b c \text {Li}_2(-i c x)}{2 d^3}-\frac {3 b c \text {Li}_2(i c x)}{2 d^3}+\frac {(b c) \text {Subst}\left (\int \frac {1}{x \left (1+c^2 x\right )} \, dx,x,x^2\right )}{2 d^3}+\frac {(3 b c) \text {Subst}\left (\int \frac {\log (2 x)}{1-2 x} \, dx,x,\frac {1}{1+i c x}\right )}{d^3}-\frac {\left (i b c^2\right ) \int \frac {1}{(-i+c x)^3 (i+c x)} \, dx}{2 d^3}+\frac {\left (2 b c^2\right ) \int \frac {1}{(-i+c x)^2 (i+c x)} \, dx}{d^3}\\ &=-\frac {a+b \tan ^{-1}(c x)}{d^3 x}+\frac {i c \left (a+b \tan ^{-1}(c x)\right )}{2 d^3 (i-c x)^2}+\frac {2 c \left (a+b \tan ^{-1}(c x)\right )}{d^3 (i-c x)}-\frac {3 i a c \log (x)}{d^3}-\frac {3 i c \left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac {2}{1+i c x}\right )}{d^3}+\frac {3 b c \text {Li}_2(-i c x)}{2 d^3}-\frac {3 b c \text {Li}_2(i c x)}{2 d^3}+\frac {3 b c \text {Li}_2\left (1-\frac {2}{1+i c x}\right )}{2 d^3}+\frac {(b c) \text {Subst}\left (\int \frac {1}{x} \, dx,x,x^2\right )}{2 d^3}-\frac {\left (i b c^2\right ) \int \left (-\frac {i}{2 (-i+c x)^3}+\frac {1}{4 (-i+c x)^2}-\frac {1}{4 \left (1+c^2 x^2\right )}\right ) \, dx}{2 d^3}+\frac {\left (2 b c^2\right ) \int \left (-\frac {i}{2 (-i+c x)^2}+\frac {i}{2 \left (1+c^2 x^2\right )}\right ) \, dx}{d^3}-\frac {\left (b c^3\right ) \text {Subst}\left (\int \frac {1}{1+c^2 x} \, dx,x,x^2\right )}{2 d^3}\\ &=\frac {b c}{8 d^3 (i-c x)^2}-\frac {9 i b c}{8 d^3 (i-c x)}-\frac {a+b \tan ^{-1}(c x)}{d^3 x}+\frac {i c \left (a+b \tan ^{-1}(c x)\right )}{2 d^3 (i-c x)^2}+\frac {2 c \left (a+b \tan ^{-1}(c x)\right )}{d^3 (i-c x)}-\frac {3 i a c \log (x)}{d^3}+\frac {b c \log (x)}{d^3}-\frac {3 i c \left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac {2}{1+i c x}\right )}{d^3}-\frac {b c \log \left (1+c^2 x^2\right )}{2 d^3}+\frac {3 b c \text {Li}_2(-i c x)}{2 d^3}-\frac {3 b c \text {Li}_2(i c x)}{2 d^3}+\frac {3 b c \text {Li}_2\left (1-\frac {2}{1+i c x}\right )}{2 d^3}+\frac {\left (i b c^2\right ) \int \frac {1}{1+c^2 x^2} \, dx}{8 d^3}+\frac {\left (i b c^2\right ) \int \frac {1}{1+c^2 x^2} \, dx}{d^3}\\ &=\frac {b c}{8 d^3 (i-c x)^2}-\frac {9 i b c}{8 d^3 (i-c x)}+\frac {9 i b c \tan ^{-1}(c x)}{8 d^3}-\frac {a+b \tan ^{-1}(c x)}{d^3 x}+\frac {i c \left (a+b \tan ^{-1}(c x)\right )}{2 d^3 (i-c x)^2}+\frac {2 c \left (a+b \tan ^{-1}(c x)\right )}{d^3 (i-c x)}-\frac {3 i a c \log (x)}{d^3}+\frac {b c \log (x)}{d^3}-\frac {3 i c \left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac {2}{1+i c x}\right )}{d^3}-\frac {b c \log \left (1+c^2 x^2\right )}{2 d^3}+\frac {3 b c \text {Li}_2(-i c x)}{2 d^3}-\frac {3 b c \text {Li}_2(i c x)}{2 d^3}+\frac {3 b c \text {Li}_2\left (1-\frac {2}{1+i c x}\right )}{2 d^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.03, size = 241, normalized size = 0.96 \begin {gather*} -\frac {\frac {32 a}{x}-\frac {16 i a c}{(-i+c x)^2}+\frac {64 a c}{-i+c x}+96 a c \text {ArcTan}(c x)+96 b c \text {ArcTan}(c x)^2+96 i a c \log (x)-48 i a c \log \left (1+c^2 x^2\right )+48 b c \text {PolyLog}\left (2,e^{2 i \text {ArcTan}(c x)}\right )+b c \left (20 \cos (2 \text {ArcTan}(c x))+\cos (4 \text {ArcTan}(c x))-32 \log \left (\frac {c x}{\sqrt {1+c^2 x^2}}\right )-20 i \sin (2 \text {ArcTan}(c x))-i \sin (4 \text {ArcTan}(c x))\right )+\frac {4 b \text {ArcTan}(c x) \left (8+10 i c x \cos (2 \text {ArcTan}(c x))+i c x \cos (4 \text {ArcTan}(c x))+24 i c x \log \left (1-e^{2 i \text {ArcTan}(c x)}\right )+10 c x \sin (2 \text {ArcTan}(c x))+c x \sin (4 \text {ArcTan}(c x))\right )}{x}}{32 d^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.14, size = 380, normalized size = 1.52
method | result | size |
derivativedivides | \(c \left (\frac {i a}{2 d^{3} \left (c x -i\right )^{2}}-\frac {3 i b \arctan \left (c x \right ) \ln \left (c x \right )}{d^{3}}-\frac {3 a \arctan \left (c x \right )}{d^{3}}-\frac {2 a}{d^{3} \left (c x -i\right )}-\frac {a}{d^{3} c x}+\frac {3 i a \ln \left (c^{2} x^{2}+1\right )}{2 d^{3}}+\frac {9 i b \arctan \left (c x \right )}{8 d^{3}}-\frac {3 i a \ln \left (c x \right )}{d^{3}}-\frac {2 b \arctan \left (c x \right )}{d^{3} \left (c x -i\right )}-\frac {b \arctan \left (c x \right )}{d^{3} c x}+\frac {9 i b}{8 d^{3} \left (c x -i\right )}+\frac {3 i b \arctan \left (c x \right ) \ln \left (c x -i\right )}{d^{3}}+\frac {b}{8 d^{3} \left (c x -i\right )^{2}}-\frac {b \ln \left (c^{2} x^{2}+1\right )}{2 d^{3}}+\frac {i b \arctan \left (c x \right )}{2 d^{3} \left (c x -i\right )^{2}}+\frac {b \ln \left (c x \right )}{d^{3}}+\frac {3 b \ln \left (-i \left (-c x +i\right )\right ) \ln \left (c x \right )}{2 d^{3}}-\frac {3 b \ln \left (-i \left (-c x +i\right )\right ) \ln \left (-i c x \right )}{2 d^{3}}-\frac {3 b \dilog \left (-i c x \right )}{2 d^{3}}-\frac {3 b \dilog \left (-i \left (c x +i\right )\right )}{2 d^{3}}-\frac {3 b \ln \left (c x \right ) \ln \left (-i \left (c x +i\right )\right )}{2 d^{3}}-\frac {3 b \ln \left (c x -i\right )^{2}}{4 d^{3}}+\frac {3 b \ln \left (c x -i\right ) \ln \left (-\frac {i \left (c x +i\right )}{2}\right )}{2 d^{3}}+\frac {3 b \dilog \left (-\frac {i \left (c x +i\right )}{2}\right )}{2 d^{3}}\right )\) | \(380\) |
default | \(c \left (\frac {i a}{2 d^{3} \left (c x -i\right )^{2}}-\frac {3 i b \arctan \left (c x \right ) \ln \left (c x \right )}{d^{3}}-\frac {3 a \arctan \left (c x \right )}{d^{3}}-\frac {2 a}{d^{3} \left (c x -i\right )}-\frac {a}{d^{3} c x}+\frac {3 i a \ln \left (c^{2} x^{2}+1\right )}{2 d^{3}}+\frac {9 i b \arctan \left (c x \right )}{8 d^{3}}-\frac {3 i a \ln \left (c x \right )}{d^{3}}-\frac {2 b \arctan \left (c x \right )}{d^{3} \left (c x -i\right )}-\frac {b \arctan \left (c x \right )}{d^{3} c x}+\frac {9 i b}{8 d^{3} \left (c x -i\right )}+\frac {3 i b \arctan \left (c x \right ) \ln \left (c x -i\right )}{d^{3}}+\frac {b}{8 d^{3} \left (c x -i\right )^{2}}-\frac {b \ln \left (c^{2} x^{2}+1\right )}{2 d^{3}}+\frac {i b \arctan \left (c x \right )}{2 d^{3} \left (c x -i\right )^{2}}+\frac {b \ln \left (c x \right )}{d^{3}}+\frac {3 b \ln \left (-i \left (-c x +i\right )\right ) \ln \left (c x \right )}{2 d^{3}}-\frac {3 b \ln \left (-i \left (-c x +i\right )\right ) \ln \left (-i c x \right )}{2 d^{3}}-\frac {3 b \dilog \left (-i c x \right )}{2 d^{3}}-\frac {3 b \dilog \left (-i \left (c x +i\right )\right )}{2 d^{3}}-\frac {3 b \ln \left (c x \right ) \ln \left (-i \left (c x +i\right )\right )}{2 d^{3}}-\frac {3 b \ln \left (c x -i\right )^{2}}{4 d^{3}}+\frac {3 b \ln \left (c x -i\right ) \ln \left (-\frac {i \left (c x +i\right )}{2}\right )}{2 d^{3}}+\frac {3 b \dilog \left (-\frac {i \left (c x +i\right )}{2}\right )}{2 d^{3}}\right )\) | \(380\) |
risch | \(\frac {3 i c a \ln \left (c^{2} x^{2}+1\right )}{2 d^{3}}-\frac {c b \ln \left (i c x +1\right )}{d^{3} \left (i c x +1\right )}-\frac {c b \ln \left (i c x +1\right )}{4 d^{3} \left (i c x +1\right )^{2}}+\frac {3 c b \ln \left (\frac {1}{2}+\frac {i c x}{2}\right ) \ln \left (\frac {1}{2}-\frac {i c x}{2}\right )}{2 d^{3}}-\frac {3 c b \ln \left (\frac {1}{2}+\frac {i c x}{2}\right ) \ln \left (-i c x +1\right )}{2 d^{3}}-\frac {c b \ln \left (-i c x +1\right )}{2 d^{3} \left (-i c x -1\right )}+\frac {3 c b \ln \left (-i c x +1\right )}{16 d^{3} \left (-i c x -1\right )^{2}}+\frac {9 i c b \arctan \left (c x \right )}{16 d^{3}}-\frac {i b \ln \left (-i c x +1\right )}{2 d^{3} x}+\frac {i b \ln \left (i c x +1\right )}{2 d^{3} x}-\frac {i c a}{2 d^{3} \left (-i c x -1\right )^{2}}+\frac {2 i c a}{d^{3} \left (-i c x -1\right )}-\frac {3 i c a \ln \left (-i c x \right )}{d^{3}}-\frac {7 b c \ln \left (c^{2} x^{2}+1\right )}{32 d^{3}}+\frac {c^{3} b \ln \left (-i c x +1\right ) x^{2}}{16 d^{3} \left (-i c x -1\right )^{2}}-\frac {a}{d^{3} x}+\frac {i c^{2} b \ln \left (-i c x +1\right ) x}{2 d^{3} \left (-i c x -1\right )}-\frac {i c^{2} b \ln \left (-i c x +1\right ) x}{8 d^{3} \left (-i c x -1\right )^{2}}-\frac {3 c a \arctan \left (c x \right )}{d^{3}}+\frac {c b \ln \left (-i c x \right )}{2 d^{3}}+\frac {c b}{8 d^{3} \left (-i c x -1\right )}-\frac {c b}{8 d^{3} \left (i c x +1\right )^{2}}+\frac {c b \ln \left (i c x \right )}{2 d^{3}}+\frac {3 c b \ln \left (i c x +1\right )^{2}}{4 d^{3}}-\frac {c b}{d^{3} \left (i c x +1\right )}+\frac {3 c b \dilog \left (\frac {1}{2}-\frac {i c x}{2}\right )}{2 d^{3}}-\frac {3 c b \dilog \left (-i c x +1\right )}{2 d^{3}}+\frac {3 c b \dilog \left (i c x +1\right )}{2 d^{3}}\) | \(516\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: RuntimeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 1.79, size = 263, normalized size = 1.05 \begin {gather*} -\frac {6 \, {\left (8 \, a - 3 i \, b\right )} c^{2} x^{2} + 4 \, {\left (-18 i \, a - 5 \, b\right )} c x + 24 \, {\left (b c^{3} x^{3} - 2 i \, b c^{2} x^{2} - b c x\right )} {\rm Li}_2\left (\frac {c x + i}{c x - i} + 1\right ) + 16 \, {\left ({\left (3 i \, a - b\right )} c^{3} x^{3} + 2 \, {\left (3 \, a + i \, b\right )} c^{2} x^{2} + {\left (-3 i \, a + b\right )} c x\right )} \log \left (x\right ) + 4 \, {\left (6 i \, b c^{2} x^{2} + 9 \, b c x - 2 i \, b\right )} \log \left (-\frac {c x + i}{c x - i}\right ) + 17 \, {\left (b c^{3} x^{3} - 2 i \, b c^{2} x^{2} - b c x\right )} \log \left (\frac {c x + i}{c}\right ) - {\left ({\left (48 i \, a + b\right )} c^{3} x^{3} + 2 \, {\left (48 \, a - i \, b\right )} c^{2} x^{2} + {\left (-48 i \, a - b\right )} c x\right )} \log \left (\frac {c x - i}{c}\right ) - 16 \, a}{16 \, {\left (c^{2} d^{3} x^{3} - 2 i \, c d^{3} x^{2} - d^{3} x\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {a+b\,\mathrm {atan}\left (c\,x\right )}{x^2\,{\left (d+c\,d\,x\,1{}\mathrm {i}\right )}^3} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________